#!usr/bin/env python  
# -*- coding:utf-8 _*-
""" 
@author:robot
@file: build_redis.py 
@version:
@time: 2022/09/05 
"""
from TapDevops.build_jenkins.build_base import BuildBase2
from TapDevops.build_jenkins.v2 import *


class BuildRedis(
    BuildBase2,
    V2RedisTaskSetting
):
    def task_redis(self, _type):
        title = ''
        path = ''
        if 'copy_list' in _type:
            if _type == 'copy_list':
                title = self.title_copy_list
                path = self.path_copy_list
            elif _type == 'copy_list_i':
                title = self.title_copy_list_i
                path = self.path_copy_list_i
            elif _type == 'copy_list_c':
                title = self.title_copy_list_c
                path = self.path_copy_list_c
            elif _type == 'copy_list_ic':
                title = self.title_copy_list_ic
                path = self.path_copy_list_ic
        elif 'dev_list' in _type:
            if _type == 'dev_list':
                title = self.title_dev_list
                path = self.path_dev_list
            elif _type == 'dev_list_i':
                title = self.title_dev_list_i
                path = self.path_dev_list_i
            elif _type == 'dev_list_c':
                title = self.title_dev_list_c
                path = self.path_dev_list_c
            elif _type == 'dev_list_ic':
                title = self.title_dev_list_ic
                path = self.path_dev_list_ic
        elif 'dev_json' in _type:
            if _type == 'dev_json':
                title = self.title_dev_json
                path = self.path_dev_json
            elif _type == 'dev_json_i':
                title = self.title_dev_json_i
                path = self.path_dev_json_i
            elif _type == 'dev_json_c':
                title = self.title_dev_json_c
                path = self.path_dev_json_c
            elif _type == 'dev_json_ic':
                title = self.title_dev_json_ic
                path = self.path_dev_json_ic
        data = self.common_build(
            title,
            path
        )
        self.build(
            data
        )
